<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>resize</title>
    <style>
      .box1 {
        width: 200px;
        height: 200px;
        background-color: orange;
        resize: horizontal;
        overflow: hidden;
      }
    </style>
  </head>
  <body>
    <div class="box1">
      <div class="box2">123</div>
    </div>
  </body>
</html>
